package com.wenwu.dao;

import java.sql.SQLException;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.wenwu.common.bean.Role;
import com.wenwu.common.bean.RoleExample;
import com.wenwu.common.page.PaginationVO;

public interface RoleMapper extends Dao {
	int countByExample(RoleExample example);

	int deleteByExample(RoleExample example);

	int deleteByPrimaryKey(Integer roleId);

	int insert(Role record);

	int insertSelective(Role record);

	List<Role> selectByExample(RoleExample example);

	Role selectByPrimaryKey(Integer roleId);

	int updateByExampleSelective(@Param("record") Role record,
			@Param("example") RoleExample example);

	int updateByExample(@Param("record") Role record,
			@Param("example") RoleExample example);

	int updateByPrimaryKeySelective(Role record);

	int updateByPrimaryKey(Role record);

	// 分页查询
	int selectTotalRecord(@Param("role") Role role,
			@Param("pageVo") PaginationVO pageVo) throws SQLException;

	List<Role> selectList(@Param("role") Role role,
			@Param("pageVo") PaginationVO pageVo) throws SQLException;

	// 批量删除
	int deleteRoleByKey(List<?> list) throws SQLException;
}